/**
 * 2017年5月3日
 */
package cn.edu.bjtu.entity.impl;

import cn.edu.bjtu.entity.ExecuteContext;
import cn.edu.bjtu.entity.ExecuteResult;

/**
 * @author Alex
 *
 */
public final class SuccessExecuteResult implements ExecuteResult<String> {

	final ExecuteContext ec;
	String tipMsg = "";
	public SuccessExecuteResult(ExecuteContext ec,String msg) {
		this.ec = ec;
		this.tipMsg = msg;
	}
	
	@Override
	public boolean isAsync() {
		return ec.isAsync();
	}

	@Override
	public boolean isSuccess() {
		return true;
	}

	@Override
	public boolean isFailed() {
		return false;
	}

	@Override
	public String getTipMessage() {
		return tipMsg;
	}

	@Override
	public boolean isExecuting() {
		return false;
	}

	@Override
	public String javaClassResult() {
		return tipMsg;
	}

}
